<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j">
      
  <ui:composition>
  
    <f:loadBundle basename="com.copractice.web.messages" var="msg"/>
    
    <a4j:outputPanel ajaxRendered="true" id="errorMessage" layout="block" styleClass="errorMessage">
      <h:message for=""/>
    </a4j:outputPanel>                     
    
    
    <rich:dataTable id="dt1" value="#{categories.areasList}" var="var" style="width:100%">
    
      <rich:column headerClass="table-head">  
        <f:facet name="header">  
          <h:outputText value="Category" />
        </f:facet>   
      
        <a4j:form>   
          <a4j:commandLink action="#{categories.loadPracticePage}" reRender="errorMessage">
            <f:param name="id" value="#{var.id}"/>
            <h:outputText value="#{var.areaName}"/>
          </a4j:commandLink>
        </a4j:form>
      </rich:column>  
      
      <rich:column headerClass="table-head">  
        <f:facet name="header">  
          <h:outputText value="# Questions" />  
        </f:facet>   
         
        <h:outputText value="#{var.numberOfQuestions}"/>
      </rich:column>
      
      <rich:column headerClass="table-head">  
        <f:facet name="header">  
          <h:outputText value="Learning Score" />  
        </f:facet>   
         
        <h:outputText value="#{var.learningScore}"/>
      </rich:column>    
      
      <rich:column headerClass="table-head">  
        <f:facet name="header">  
          <h:outputText value="Teaching Score" />  
        </f:facet>   
         
        <h:outputText value="#{var.teachingScore}"/>
      </rich:column>  
    </rich:dataTable>

  </ui:composition>
  
</html>